<template>
  <view class="reportList">
    <view class="reportItem">
      <view class="report-info">
        <view class="leftflex">
          <view class="icon-file" />
          微信账号授权(头像、用户名、手机号)
        </view>
        <AtSwitch
          :checked="info"
          :onChange="checkInfo"
          class="scale"
          color="#6C63FF"
        />
      </view>
    </view>
    <view class="reportItem">
      <view class="report-info">
        <view class="leftflex">
          <view class="icon-file" />
          微信运动授权(步数)
        </view>
        <AtSwitch
          :checked="step"
          :onChange="checkStep"
          class="scale"
          color="#6C63FF"
        />
      </view>
    </view>
    <view class="privacyPolicy" @tap="goPrivacyPolicy">《文朵健康隐私协议》 </view>
  </view>
</template>

<script>
import Taro from "@tarojs/taro";
import { AtSwitch } from "taro-ui-vue";
import "./index.less";

export default {
  components: { AtSwitch },
  data() {
    return {
      list: [],
      step: true,
      info: true,
    };
  },
  methods: {
    goPrivacyPolicy(e) {
      Taro.navigateTo({ url: "/pages/privacyPolicy/index" });
    },
    checkStep() {
      this.step = !this.step;
    },
    checkInfo() {
      this.info = !this.info;
    },
  },
  async created() {},
};
</script>

<style lang="scss">
@import "~taro-ui-vue/dist/style/components/switch.scss";
</style>
